package toUse {
	import rule.IDisplayElem;
	import rule.IObserver;
	import rule.ISubject;
	
	/**
	 * ...
	 * @author wibrst@qq.com
	 */
	public class CurrCondDisp implements IObserver, IDisplayElem{
		
		public function CurrCondDisp( weatData:ISubject ) {
			this._weatData = weatData;
			this._weatData.regObserver( this );
		}
		
		/* INTERFACE rule.IDisplayElem */
		
		public function display():void {
			trace( this, "Temp:", this._nTemp, "Humi:", this._nHumi );
		}
		
		/* INTERFACE rule.IObserver */
		
		public function update(nTemp:Number, nHumi:Number, nPres:Number):void {
			this._nHumi = nHumi;
			this._nTemp = nTemp;
			this.display();
		}
		
		private var _nHumi:Number;
		private var _weatData:ISubject;
		private var _nTemp:Number;
	}

}